<template>
	<view class="page">
		<pageTxt>
			<!--  v-model="dataList" @query="queryList" -->
			<z-paging ref="paging" refresher-only @onRefresh="onRefresh" :paging-style="{ 'background-color': '#f7f7f7', height: '100%', width: '100%' }">
				<!-- 头部 -->
				<template slot="top">
					<u-navbar title="项目评分详情" :autoBack="true" :fixed="false"></u-navbar>
				</template>
				<!-- 内容 -->
				<view class="detail-content-box" v-if="dataObj">
					<u-empty v-if="!$fieldShowFunc('16-xmpj')" marginTop="300rpx" icon="https://hzybucket.obs.cn-south-1.myhuaweicloud.com/we_chat/no-msg2.png" text=" "></u-empty>
					<template v-if="$fieldShowFunc('16-xmpj')">
						<view class="item-box">
							<view class="title">项目信息</view>
							<view class="item-box-item flex jb" v-if="$fieldShowFunc('pf_xmmc')">
								<text class="txt">项目名称</text>
								<view class="content">{{ dataObj.project_name }}</view>
							</view>
							<view class="item-box-item flex jb" v-if="$fieldShowFunc('pf_xmbh')">
								<text class="txt">项目编号</text>
								<view class="content">{{ dataObj.project_number }}</view>
							</view>
							<view class="item-box-item flex jb" v-if="$fieldShowFunc('pf_xmpp')">
								<text class="txt">项目品牌</text>
								<view class="content">{{ dataObj.brand_name }}</view>
							</view>
							<view class="item-box-item flex jb" v-if="$fieldShowFunc('pf_xmlx')">
								<text class="txt">项目类型</text>
								<view class="content">{{ dataObj.store_type_name }}</view>
							</view>
						</view>
						<view class="item-box" v-if="$fieldShowFunc('pf_xmpf')">
							<view class="title">项目评分</view>
							<template v-for="(item, index) in dataObj.evaluation_content">
								<view class="item-box-item flex jb" :key="index">
									<text class="txt">{{ item.name }}</text>
									<u-rate :count="5" :value="item.score" gutter="8" inactiveIcon="star-fill" active-color="#F7A059" inactive-color="#D0D6DA" readonly></u-rate>
								</view>
							</template>
						</view>
					</template>
				</view>
			</z-paging>
		</pageTxt>
	</view>
</template>

<script>
export default {
	data() {
		return {
			loading: true,
			dataObj: '',
			tabIndex: 0,
			tablist: [
				{
					name: '项目信息'
				},
				{
					name: '项目评分'
				}
			]
		};
	},
	onLoad(option) {
		if (option.item) {
			this.dataObj = JSON.parse(option.item);
			console.log(this.dataObj);
		}
	},
	methods: {
		onRefresh() {
			this.$refs.paging.complete();
		},
		tabClickFunc(e) {
			this.tabIndex = e.index;
		}
	}
};
</script>

<style lang="scss" scoped>
@import 'projectRatingDetail.scss';
</style>
